<%-- 
    Document   : viewfavouritedsales
    Created on : Nov 4, 2012, 1:29:07 AM
    Author     : Ahsan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/tlds/PrintSaleListTable.tld" prefix="saletable" %>
<%@ taglib uri="/WEB-INF/tlds/PrintPageNumbers.tld" prefix="printpages" %>
<%@page import="ca.trader.beans.java.UserSalesLookupBean"%>
<html>
    <head>
        <jsp:include page="head.jsp" />
    </head>
    <body>
	<c:choose>
	    <c:when test="${empty param.page}" >
		Missing parameter "page".
	    </c:when>
	    <c:otherwise>
		<jsp:useBean id="sales" class="ca.trader.beans.java.UserFavouritedSalesListLookupBean" scope="request" />

		<jsp:setProperty name="sales" property="pageNumber" param="page"/>
			<%
					  sales.setSession(session);
			%>
	 

		<c:choose>
		    <c:when test="${!sales.resultsFound}">
			No results found.
		    </c:when>
		    <c:otherwise>
			<saletable:PrintSaleListTable saleList="${sales.saleList}" />
			<br/>
			<printpages:PrintPageNumbers currentPageNumber="${sales.pageNumber}" totalPageNumbers="${sales.totalPageNumbers}" 
						     redirectOutputUrlPattern="viewfavouritedsales.jsp?page=%d" />
		    </c:otherwise>
		</c:choose>
	    </c:otherwise>
	</c:choose>
    </body>
</html>
